package com.spukmk3me.scene;

import com.spukmk3me.scene.Node;

public abstract class Animator
{
    public final void setFlags( int flags )
    {
        m_flags = flags;
    }
    
    public final int getFlags()
    {
        return m_flags;
    }
    
    final void setNode( Node node )
    {
        onNodePrepareToChange( node );
        m_node = node;

        if ( node != null )
            onNodeChanged();
    }
    
    public final Node getNode()
    {
        return m_node;
    }
    
    public abstract boolean isAnimating();
    public abstract void animate( int time );

    protected abstract void onNodePrepareToChange( Node newNode );
    protected abstract void onNodeChanged();
    
    public static final int FLAG_AUTODROP = 0x00000001;
    
    private Node m_node;
    private int m_flags;
}
